However, it is the interaction of these two functions and using a global pointer variable called namestr that causes both the leak and the dangling pointer. 然而,它是这两个函数的相互作用,利用一个全球性的指针变量叫做namestr,它会导致渗漏和不断摆动的指针。
Pausing at mid-scan of a stack could cause stores to be lost track of or missed during two partial scans, creating a dangling pointer within the heap. 栈扫描过程中的暂停可能导致丢失对存储的跟踪或在两部分扫描之间错过,在堆中产生一个悬空指针。
In main, after returning from foo(), namestr is actually a dangling pointer, because foo() has freed that memory before returning. 在main中,当从foo()返回后,namestr实际上时一个摆动的指针,因为foo()已经在返回前释放了那个内存。